package com.cole.miniapp.project.service;

import com.cole.miniapp.project.domain.FcmBusiness;
import com.cole.miniapp.project.domain.FcmUser;
import com.cole.miniapp.project.domain.FcmUserConsumption;
import com.cole.miniapp.project.domain.FcmUserRecharges;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import me.chanjar.weixin.common.error.WxErrorException;

import java.math.BigDecimal;
import java.nio.file.Path;
import java.util.List;

/**
 * @Author: Ceanie
 * @Despriction:
 * @Date: Created in 16:07 2019-05-17
 * @Modify By:
 **/
public interface PayService {

    FcmUserRecharges createRecharge(FcmUser fcmUser, BigDecimal money);

    WxPayMpOrderResult payRecharge(FcmUser fcmUser, String orderNumber) throws WxPayException;

    void updateOrder(WxPayOrderNotifyResult notifyResult) throws WxErrorException;

    String createPaymentCode(FcmBusiness fcmBusiness, BigDecimal money,String formId);

    FcmUserConsumption userScanQrcoderGetOrderInfo(String orderNumber);

    boolean userScanQrcoderPay(FcmUser fcmUser, String orderNumber) throws Exception;

    int storeRechargesToUser(FcmBusiness fcmBusiness,Long userId,String phone, BigDecimal money);

    List<FcmUserRecharges> getRechargesList(Long id,int page);
}
